Linux logo


Last updated:
10th Jan 1999
(revision 5)



Support the Anti-Microsoft Campaign



I've tried to make these instructions as simple and concise as possible, in order for people to install and get running, ARMLinux on their Acorn Risc PC. Installing Linux is not the simplest of things to do, but I hope these instructions will go some way into taking some of the fear away from new users who feel daunted by the thought of installing it on their machine.
Please do give feedback if you think I've missed anything, or that something could be worded simpler.

These instructions assume that you have a Risc PC computer (with or without StrongArm), a copy of the Acorn Clan CD (containing the RedHat Linux distribution) and want to install on the internal (Acorn) IDE hard drive. One problem is that you need the RPM files as a suitable zipfile, yet need to re-format your hard drive, so you either need a second hard drive or a zip disc on which to copy your RPM archive. This will be approx. 78Mbytes long!
Email me if you have different requirements and I will try to help.
I have also written out any relevant web addresses in full, so that you can print out this page for reference.

  1. Make yourself a cup of tea and make sure you are sitting down comfortably. We shall begin.

  2. Obtain 4 floppy discs. Format one to ADFS and three to DOS 1.44Mb format.

  3. You will also need the Acorn Clan CD containing the Linux RPMs and a copy of raFS (v1.15 or later) (available from http://www.informatik.tu-muenchen.de/~atterer/) or !ZipEE (available from http://www.geocities.com/CapeCanaveral/2435/zipee.html)

  4. Unfortunately, the Linux RPMs are stored within an X-File on the Clan CD. This is no good because Linux cannot read x-file partitions. You will need to re-archive all the RPM files, for which there are two possibilities; Either you can use an raFS disc or you create a large ZIP file. In contrast to using raFS, creating the ZIP file can take some time (just over an hour on my StrongArm RPC - although a lot quicker if you copy the X-File onto a local hard disc first!) and will generate a file some 78Mbytes long.

  5. To do this, firstly ensure that you have enough disc space to store the data (about 78 Mbytes and I wouldn't recommend creating it straight onto an Iomega zip disc).

    If you have decided to use raFS, follow the instructions in setp 6 below, otherwise follow the instructions in stepe 7 to 12.

  6. Run raFS, then create a new raFS disc called "RPMS" on the media where you want to store the RPMs, eg. as ADFS::4.$.!RPMS, and double-click on !RPMS. Now copy all the files contained in CDFS::AcornCD.$.Specials.ARMLinux.Distrib.RedHat.RPMS into the directory named raFS::RPMS.$ that just opened.
    Note that the name of the disc must be "RPMS", stored in a directory called "!RPMS", with all letters uppercase.

  7. Copy the file "zip" (from inside !ZipEE.Resources) into your library directory (or somewhere it will be executed when you type "zip" from the f12 cli prompt!).

  8. You will also need to load !x-files. This is also on the Clan CD (inside the Freeware.Disc.X_files directory).

  9. You now need to STORE the files into a ZIP archive (don't re-archive them), so press f12.

  10. Make your current directory the x-file directory on the CD by typing
    *dir cdfs::AcornCD.$.Specials.ARMLinux.Distrib.RetHat.RPMS
    and press return.

    N.B. Creating the ZIP file will be a lot quicker if you first copy the entire X-File image off the CD onto your hard disc. This command will then become something like
    *dir adfs::HardDisc4.$.RPMS
    (assuming you've copied the RPMs into the root directory).

  11. Now type the following;
    zip -0 adfs::ARMLinux.RPMs/zip *
    and press return. N.B. You may need to change the filename depending upon where you want to create and store the new RPMs file.
    Now go and make a cup of tea, because if you don't get an error this action will take over an hour to perform if you do it directly from the CD. Copying to the hard disc first will speed it up to around 10-15 minutes.
    You are now copying 78MB of data from the x-file into a zip file.

  12. Next, I would also recommend downloading a copy of Phil Norman's "ClanInstall" package from his web site at http://inkvine.fluff.org/~forrey/linux-arm.html. You will need things like cp, mv and unzip.

  13. You will also need the relevant root and supplemental installation disc images. These are either available from the Clan CD or from the ARMLinux web site at http://www.arm.uk.linux.org/.

  14. Onto the ADFS disc, copy !LinConfig, !Linux, !PartMan and !WriteDisc.

  15. Obtain a copy of the relevant kernel for your machine and store a copy of that on your ADFS disc. This should be available to download from .

  16. Next I would recommend getting all your floppy discs ready for the installation. Have the three remaining (DOS formatted) discs ready.

  17. Double-click on !WriteDisc. This will open a window prompting you to drag the relevant installation image onto it. Locate the Linux 'root disc image' and drag it to this window.

  18. Insert the first DOS formatted disc into the drive and click on 'Write Disc'. This will create a "Linux root filesystem" disc. Label it and put it somewhere safe.

  19. Repeat the previous step with the second DOS disc and the 'supplemental disc image'. This will create your "Linux Supplemental disc".

  20. Next, insert your third DOS disc and copy onto it "cp", "mv", "tar", "unzip" and a copy of your "kernel".
    If your RPMs are stored in an raFS disc you will also need to copy the precompiled "rafsln" binary supplied with raFS onto the disc. N.B. If you have more than 24Mbytes of memory fitted to your computer you will need to ensure that you have downloaded the latest modules package. This is available at ftp://ftp.arm.uk.linux.org/pub/armlinux/RedHat/RPMS/modules-2.0.0-5a3.arm.rpm. Copy this onto your DOS disc as well as you will need it later.

  21. You also need !HForm as you will need to re-format your Acorn hard disc, so backup all your stuff. I haven't tested with other IDE interfaces though.

  22. You are now ready to start. Make sure you have backed up everything from your drive and run !HForm. You need to make the ADFS partition smaller than the whole drive so calculate the relevant number of cylinders. I tended to just calculate it roughly as a percentage of the drive. For instance, if your drive is 850MB and you want to let Linux have 3/4 of the available space, just shrink the default number of cylinders by 3/4.

  23. Reformat the drive.

  24. Insert your ADFS floppy disc, create a directory in the root of your newly formatted hard drive called "ARMLinux" and copy the entire contents of your ADFS floppy disc.

  25. At this point you will also need to copy the zip file or raFS directory containing your RPMs into the ARMLinux directory.

  26. Now run !PartMan to setup the Linux partitions.

  27. Enter ADFS and 4 for the File System and Hard Drive respectively and you should see the relevant partition information displayed. Something like;

    PartitionStartEndSizeType
    10403199197 MBFilecore

    Don't worry if the numbers are different, as you probably have a different size ADFS partition to me.

  28. Click MENU over the PartMan window and click on 'New'. You will get a "New Non-Filecore Partition" window open and be asked the type of partition you want. Select Linux from the little menu option. Click Create to create the Linux Table partition. This should update the little table above with another entry below the filecore one, with a 1k Linux Table entry and an entry telling you how much free space is remaining at the end.

  29. Press MENU over the free space entry and select 'New' again. This time you'll get a new partition window with a number of start and end sector information. Don't worry about this.
    At the bottom right it will say 'Size' and the amount of free space. Click in this icon and decrease the value by around 25-50Mbytes (to save enough space for your Linux swap partition) Press return and PartMan will recalulate the other values for you.
    Make sure that the type of partition says 'Linux Native' and click ok.
    Mine is currently 616MB free so I'm going to reduce it to say 580MB (I just chose a nice round number).

    The table should now look something like this;

    PartitionStartEndSizeType
    10403199197 MBFilecore
    24032004032011 KBLinux Table
    34032021591042580 MBLinux Native
    41591043166420736 MBFree


    Again, don't worry if the values are slightly different - unless you are using the same sized partitions as me.

  30. Now press MENU over the free space again (repeating the previous step) and you'll get the 'New Partition' window open again. This time you want to leave the size as it is (to use up the remaining disc space), but change the Type to 'Linux Swap' by clicking on the up arrow to the right of the Type icon. Click OK to confirm.

  31. You should now see the following table;

    PartitionStartEndSizeType
    10403199197 MBFilecore
    24032004032011 KBLinux Table
    34032021591042580 MBLinux Native
    41591043166420736 MBLinux Swap


    Click MENU over the PartMan window and click on 'Save'. Click on the 'Yes' icon to confirm your choice. This will write the modified partition information back to your hard drive.

    You are now ready to install Linux

  32. For this part you will need the three DOS discs that you prepared earlier; the Linux install disc, supplemental disc and the one containing TAR and UNZIP etc.

  33. Ensure that your ADFS drive contains a directory called ARMLinux in the root directory, which in turn contains

    !LinConfig(ARMLinux Risc OS configure utility)
    !Linux(ARMLinux)
    base/tar
    instim/tar
    one of !RPMS or RPMs/zip(RedHat RPMs raFS'ed or Zipped off the X-file on the Clan disc) and,
    kernel(the relevant ARMLinux kernel for your machine)


  34. Press f12 and type the following;

    ARMLinux.!Linux -bootkernel ARMLinux.kernel

    and press return.[1]

  35. If all is well there should be a short delay and the message "Press SPACE or click mouse to continue" should appear. Do as it says.

  36. The screen should now clear and you should be presented with the Kernel Loader menu consisting of two options; 1: Return to RiscOS and 2: Linux.

    Press cursor down so that the -> is pointing to Linux and press return.

  37. The computer will then ask you to "Enter extra arguments:". Just press return as we don't want any at this point.

  38. If all is well the screen should clear and the computer will display "Uncompressing Linux" and there will be a delay followed by loads of lines of status messages and system information.
    If you don't get this, it probably means you have got hold of the wrong kernel for your machine.
    N.B. Some people have pointed out to me that you can get a screenful of "Wild interrupt from backplane" errors unless you physically unplug Castle SCSI cards. You may need to physically remove this podule, or check the ArmLinux web site for current compatibility.

  39. The bottom line should say something like;

    VFS: Insert root floppy disk to be loaded into ramdisc and press ENTER


    or something similar.

  40. Insert the ARMLinux root disc (the first DOS disc that you created) into the floppy disc drive and press return.

  41. You will get a message like "Loading 1024 blocks into ram disk..." and a little rotating ASCII symbol.

  42. It will take a little while (as it loads the disc from floppy) and eventually the screen will clear and you'll get the "Welcome to Red Hat Linux" window asking you if you are using a colour monitor. I'll assume you are, so just press return.

  43. You should now get a blue screen with the "Welcome to Red Hat Linux for ARM!" screen. Press return again.

  44. It will now ask you for the installation method. Press cursor down a couple of times so that "hard drive" is highlighted (yellow on blue) and press return again.

  45. At this point you need to remove the root disc from the floppy drive and insert the supplemental disc that you created earlier. Press return when you've inserted the supplemental disc.

  46. There will now be a long delay (accompanied by a percentage bar which slowly turns red) as the kernel loads the supplemental disc from floppy.

  47. Eventually the screen will clear and the computer will display the "Installation Path" window. DO NOT press return here. Instead press Alt-f2 to jump out of the graphical display into a CLI mode.

  48. Remove the supplemental disc from the floppy drive and insert the third (DOS formatted) disc containing the Linux binaries.

  49. Now enter the following commands exactly!
    N.B. If you are installing on a second IDE hard disc you should change ALL references to hda to hdb from now onwards in these instructions.
    Make sure you enter them with the correct upper or lower case. Linux DOES care about this.
    If you make a mistake, use the BACKSPACE key because Linux doesn't like the Acorn delete key.

    mkdir mnt
    mkdir adfs
    mount -t msdos /dev/fd0 mnt(the floppy disc should whirr at this point)
    mount -t adfs /dev/hda1 adfs(the hard disc should briefly whirr at this point)
    OLDPATH=$PATH
    PATH=$PATH:/mnt
    mknod /dev/hda3 b 3 3The second 3 should be 67 if installing onto IDE drive 5 (ie. a second IDE drive)
    mke2fs /dev/hda3(at this command you will get a few lines of data and Linux will start writing some inode tables. If not, it's possible that Linux doesn't like your hard disc)
    This is formating the device as a Linux second extended filesystem so is likely to mess up your partitions if you get it wrong!
    mkdir hd
    mount -t ext2 /dev/hda3 hd(the hard disc will briefly whirr again)
    cd hd
    mkdir RedHat(note case of letters)
    rafsln -s /adfs/ARMLinux/!RPMSEnter this command only if using raFS
    (now the floppy disc will whirr before the harddisc is accessed. The rafsln tool will create a directory called RPMS containing "soft links" to the individual files as stored in the raFS disc on your ADFS partition, which means the files themselves aren't copied, they are just "referenced". Since this operation only takes a few seconds, using raFS instead of zip has already saved you two cups of tea...)
    mkdir RedHat/RPMSMiss out this command if using raFS
    (note case again)
    cd RedHat/RPMSAgain, miss out this command if using raFS
    unzip /adfs/ARMLinux/RPMs.zipMiss out this command if using raFS
    (at this point the floppy disc will whirr and then the hard disc will extract all the RPM files in the zip inside the ADFS partition of the drive.
    Time to make another cup of tea!
    ...
    This takes between 5 and 20 minutes depending upon your processor.
    cd /hd/RedHat
    tar -xvf /adfs/ARMLinux/base.tar(floppy will whirr and some more (base) files will be extracted from the adfs hard disc)
    tar -xvf /adfs/ARMLinux/instim.tar(as above)
    cd ..
    tar -xvf /adfs/ARMLinux/instim.tar(yes, the same as above. Don't ask why)
    PATH=$OLDPATH
    cd /
    umount mnt
    umount hd
    umount adfsDO NOT enter this command if using raFS!


  50. At this point, breath a sigh of relief and wonder why you ever wanted to install Linux.
    It could be worse. You could be trying to install Microsoft Windows.

  51. Now press Alt-f1 and you can return to the installation with the nice graphical interface.

  52. The cursor should be flashing next to the 'Install' option on the "Installation Path" window. Press return.

  53. You will be asked if you have an SCSI adapters and the cursor should be on 'No'.
    Press return again.
    You may find that your CD is accessed here. It should continue, but you may need to wait a couple of minutes.

  54. You are then asked to Partition Disks. Press return again (ie. 'Done')
    Again, the CD may be accessed.

  55. You now need to point to setup Linux's swap space. You should get a display similar to the following;

    DeviceBeginEndSize (k)
    /dev/hda41579165136582

    Again, don't worry if the begin/end/size numbers are different. Your swap partition is no doubt a different size to mine.

    There should be a little * to the left of the device and the cursor will be flashing next to it. Press TAB to highlight the 'OK' button and press return.

  56. Linux will now initialise the swap space. There is probably not quite enough time here to make another cup of tea, although you may need one.

  57. Next you will be asked to select the partition holding the Red Hat RPM files. Usually the installer gets it wrong so you need to press cursor down to highlight /dev/hda3.
    Press TAB to get to the next field; the directory holding Red Hat. Press TAB again, leaving it as "/".
    'Ok' should now be highlighted, so press return again.

  58. It should now say "Scanning available packages". If it doesn't, something major has gone wrong and unfortunately, you will probably need to start back at step 1.
    The most common cause of problems here is giving the raFS disc a wrong name or incorrectly creating the zip file containing all the RPM files. The RPMs should be in the root directory of the raFS disc or archive and not nested at all.

  59. After some hard disc whirring you will probably get an error message like "package cproto at line 110 dne" or something. Press f12 here (DO NOT hold it down because Linux's key repeat is a bit fast!)

  60. You may get some more "package xxx at line xxx dne" type errors. Press f12 ONCE at each one.
    (on my setup I needed to press f12 5 times in order to get to the next step)

  61. After pressing f12 if needs be you should be asked to select the Root Partition. /dev/hda3 should be highlighted, so press return.

  62. You will now be asked if you want to setup other partitions within your filesystem. We don't, so press f12 again to skip to the next screen.

  63. It will then ask you which partitions you wish to format. This bit can be skipped so press f12 again.

  64. You now get to the bit where Linux wants to know which components you wish to install.
    Just move down the list hitting SPACE to select each component and cursor down to move on to the next one. Note that the list of components scrolls as you get towards the bottom, so don't do what I did first time and that's not realise there is a whole list of components out of sight down the list.
    I would tend to install everything (there is an 'install everything' option at the bottom of the list), just to be on the safe side.

  65. Press TAB twice to highlight 'Ok' and press return.

  66. You now get a friendly message about Linux creating an install log for you. Press return again.

  67. Now hire a rowing boat, drive to the coast, row to China, pick some tea, row home again, pop down the chippie, boil some water, make a big pot of tea and.....
    I'm not saying that this step takes a little while but......
    Seriously though, this step will take around 50 minutes on a RPC 700 or around 15 minutes on a StrongArm!

  68. Eventually you will asked what type of keyboard you have. Press cursor up to select UK and press return.

  69. You will be told the new keymap has been loaded and you can press return again.

  70. Next you are asked what type of mouse you have. The default highlighted one should be 'RiscPC/Archimedes mouse'. Press TAB and space to select 'Emulate 3 buttons' if you wish to emulate all three buttons.
    Press TAB again to highlight 'Ok' and press return.

  71. There will be a short delay and then you'll be asked to configure LAN networking.
    This bit doesn't seem to work on my system (despite having EtherH fitted!) so I would recommend pressing TAB to highlight 'No' and pressing return. Please email me if you know why this doesn't seem to work on my setup (can't detect hardware, despite having an i-cubed network card fitted)

  72. You now need to configure the timezone your machine is in. Set appropriately and press TAB to highlight 'Okay' and press return again.

  73. You now have to enter the root password you require. Enter it twice pressing return after each.

  74. Press return again to complete the installation.

  75. The machine will probably now crash with the error "I couldn't find a kernel!". Don't worry about this. It's just the installer doing an impression of a Microsoft product.

  76. Press Alt-f2 to jump back to the CLI.

  77. Type in /mnt/bin/sync and press return. This will re-sync the drive and the hard disc will whirr a bit and the # prompt will return. If you get any error messages, something serious has gone wrong somewhere!

  78. Press CTRL-ALT-DELETE to reset the machine.

  79. Wait for the machine to reboot and return to the desktop and press f12 again.

  80. Type *armlinux.!linux -bootkernel armlinux.kernel and press return.[1]

  81. Press space at the prompt and you should get the boot loader screen again.

  82. Select option 2: Linux and press return.

  83. Enter root=/dev/hda3 when asked for extra arguments. This will boot off the hard disc you've just installed on.

  84. You should get the "Uncompressing Linux" and all the Linux loading messages.
    The computer will then start Parallelizing fsck and you will need to wait for it to check the filesystem. This may take a few minutes.

  85. Eventually it will continue and display a lot of 'Starting . . . .' type messages, eventually clearing the screen and giving you the Linux localhost login: prompt.

  86. Enter root for the username and enter the password you selected earlier.

  87. If all is well (fingers crossed) you should be logged in correctly and get the [root@localhost /root]# prompt. You are now in Linux.

  88. One thing to note is that to get out of Linux and make it safe for turning the machine off (or resetting back to Risc OS) you should enter "shutdown -h now" when logged in as the root user.
    This will tell Linux to shutdown and halt the system (-h) and do it now.
    Once Linux has displayed a number of shutting down messages it will say something like "System halted" and lock up. You can now turn the machine off or press CTRL-ALT-DELETE to reboot into Risc OS.

  89. I would recommend getting a book to explain all the various Linux commands. A good one to give a general background to Linux in general is "Running Linux" by Matt Welsh and Lar Kaufman, pub. by O'Reilly (ISBN 1-56592-151-8) or "Linux in a Nutshell" by Jessica Perry Hekmann, pub. by O'Reilly (ISBN 1-56592-167-4). The latter book is more of a handy reference manual.

Possible Problems:
Two of the most popular problems mentioned in the FAQ I shall explain here in a bit more detail for novices or newcomers.

When logging on for the first time, Linux goes into a loop keeping requesting the username and password, even though you have entered them correctly.
The early version of the insmod had a known bug which prevented it being correctly liked to the kernel if you have more than 24Mbytes of RAM fitted in your machine.
Firstly you will need to make sure you have a copy of the latest modules package (available from ftp://ftp.arm.uk.linux.org/pub/armlinux/RedHat/RPMS/modules-2.0.0-5a3.arm.rpm) and store it on a DOS formatted floppy disc - hopefully you did this at step 18!
You need to boot into Linux like you did at step 81, but add the additional "argument mem=16M" which will force Linux to use a smaller amount of memory. Thus your extra arguments would be;
mem=16M root=/dev/hda3

This will get you into Linux and you should be able to log in as root.
Insert the DOS disc that you had at step 18 (the one with the new modules package on it) and enter the following commands;
mount -t msdos /dev/fd0 /mnt
rpm -U /mnt/modules-2.rpm
(or whatever the filename was, remembering to include the /mnt/ which will load it from floppy)

This will update the modules and you should then reboot so that next time you load Linux you shouldn't need to worry about having more than 24Mbytes of memory.

Solving the "invalid bmap magic in first sector of partition" error
This is caused by Linux failing to write the partition information correctly, so that Risc OS cannot read the Linux partition correctly. This can be solved by creating the relevant bmap (block map) tables within Linux, by use of the loadmap command. Again you will need your DOS disc containing the Linux kernel (step 18) and boot back into Linux, logging in as the root user.
Firstly ensure you are logged in correctly as the root user and then copy the kernel from the floppy disc onto your Linux partition using the following commands;
mount -t msdos /dev/fd0 /mnt
cp /mnt/kernel /vmlinux

This will copy the kernel from the floppy disc into the root directory of the Linux partition, calling it "vmlinux".
You now need to create a boot.conf file in the /etc directory. The best way to to this is to use the simple Linux editor called VI. Type the following;
vi /etc/boot.conf
This creates the file, clears the screen and presents you with the VI command screen. You now want to insert some lines into the file so press "i" to insert some new lines. This will put you in to insert mode so that you can type the following;
# Linux 2.0.30 block with no ramdisk
kernel {
name = "Linux 2.0.30";
path = "/vmlinux";
root = "/dev/hda3";
ramdisk = 0;
flags = readonly;
};
Now press ESCAPE to exit from insert mode and return to command mode.
Enter ZZ to save the file and exit back to the Linux prompt.
You now need to issue a loadmap command to create the bmap. However, for this to work you need to set up a symbolic link from your root filesystem to /dev/root. A symbolic link is a bit like setting an alias in Risc OS in that it sets up a pseudo filepath pointing to an existing filepath. To do this, enter the following;
ln -s /dev/hda3 /dev/root
You can now issue a loadmap command by entering the following;
loadmap -v
This should create the bmap table so that !Linux will now boot into Linux when you double-click on it from Risc OS.

More details on this problem are given in the Linux FAQ at http://www.arm.uk.linux.org/faq.html, but feel free to email me if you want more information or help.

Installation Notes:
1. The new !Linux application needs the kernel location to be specified using the !LinConfig application. More information on this as soon as I re-install a system to see what's been updated during the last month since I wrote these instructions.

Additional Notes:
To start up the X windowing system, enter startx and press return, from the Linux prompt. A grey screen with a black (xterm) window will appear in the top left. Enter "fvwm &" to get the window manager. You should then be able to use the Xwindows environment.

If you can't type text in Xwindow text boxes, you may need to edit the .Xdefaults file which is in your user root directory. The easiest way is to load up Emacs in xwindows and edit the file that way Somewhere at the top, just before the emacs section add the following line;

*input: true

and save the file.

Acknowledgements:
I would like to thank the following people for helping to expand Acorn users knowledge of Linux:
Anyone else who has contacted me with suggestions, whom I've forgotten to mention by name.

Useful web sites:


Software !Boot & Mods Internet Networking ARMLinux Web Ring Links

©1998 Paul Vigay